<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/ec/ecside_style.css" />
<%@include file="/common/meta.jsp"%>
<%@include file="/common/uploadify.jsp"%>
<script type="text/javascript" src="${ctx}/pages/admin/fileattch/fileattch.js"></script>
<LINK href="${ctx}/styles/style.css" type='text/css' rel='stylesheet'>
<LINK href="${ctx}/pages/admin/fileattch.css" type='text/css' rel='stylesheet'>
<script type="text/javascript" src="${ctx}/scripts/fckeditor/fckeditor.js"></script>
<%@include file="/common/validator.jsp"%>

<script type="text/javascript">
  //文本编辑组件
  function preFckEditor(){
	var fckEditor = new FCKeditor( 'content' ) ;
    fckEditor.BasePath = "${ctx}/scripts/fckeditor/";
    //fckEditor.ToolbarSet = 'Basic';
    fckEditor.ToolbarSet = 'Default';
    fckEditor.Height = 360;
    fckEditor.Width = 720;
    fckEditor.ReplaceTextarea();
  }
</script>
</head>
<body onload="preFckEditor()">
<div class="x-panel" style="width: 100%">
<div class="x-panel-header">日志管理</div>

<div><%@ include file="/common/messages.jsp"%></div>
<div align="center">
<s:form id="saveFrm" action="save.do" method="post" theme="simple" validate="true" enctype="multipart/form-data">
	<s:hidden name="model.id" />
	<fieldset style="width:780px; padding:10px 10px 10px 10px;" >
	<legend>编辑日志</legend>
        <table width="770px" align="center">
		<tr>
			<td align="right" width="100">标题：</td>
			<td align="left" colspan="3">
			   <s:textfield id="title" name="model.title" cssStyle="width:600px" cssClass="required"/><font color="red">&nbsp;*</font>
			</td>
		</tr>
		<tr>
			<td align="right" width="100">类型：</td>
			<td align="left" width="200">
				<s:select id="diaryTypeMap" list="diaryTypeMap" name="model.diaryType.id" headerKey="" headerValue="请选择" cssStyle="width:130px"></s:select>
			</td>
			 
		    <td align="right" width="245">
		               时间：
		    </td>
			<td align="left" width="230"><input type="text" name="model.createDate"  style="width:130px;height:20px"
				value='<s:date name="model.createDate" format="yyyy-MM-dd HH:mm"/>'
				onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm'})"
				class="Wdate required" readonly="readonly" /><font color="red">&nbsp;*</font></td>	
		</tr>
        <tr>
           <td align="right">
           	附件：
           </td>
           <td colspan="3">
			<input type="file" id="systop_upload"/>&nbsp;注：<b><span style="color:#EB2A03">附加大小在100M以内!</span></b>
			<div id="custom"><div id="systop-file-queue"></div></div>
			<div id="systop-uploaded-files" style="width:720px; border-bottom: 1px dotted #000;">
			    <input type="hidden""" id="fileattchids" name="fileattchids" value="${model.attachIds}"/>
			</div>
			<div id="systop_file_list"></div>
           </td>  
        </tr>
        
		<tr>
			<td align="right">内容：</td>
			<td align="left" colspan="3">
				<textarea id="content" name="model.content" cols="65" rows="4">${model.content}</textarea>
			</td>
		</tr>
		        
	</table>
	</fieldset>
    <table width="700px" style="margin-bottom:10px;">
		<tr>
			<td style="text-align: center;">
			  <s:submit value="保存" cssClass="button" />&nbsp;&nbsp;
			  <s:reset value="重置" cssClass="button" />
			</td>
		</tr>
	</table>
</s:form></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#saveFrm").validate();
});

//渲染上传组件
renderUploader();
viewFileAttchList('${model.attachIds}', true);
</script>
</body>
</html>